Field of the Invention
Aspects of the present invention relate to an electronic device which can charge a battery and a method for controlling charging of a battery.
Description of the Related Art
An electronic device such as a digital camera generally includes a detachable battery. It is known that such an electronic device is configured to charge a battery with power supplied via a USB (Universal Serial Bus) cable while the battery is mounted in the device. When an external apparatus is connected to the electronic device via the USB cable, a series of data exchange called enumeration is performed between them. This enumeration allows the electronic device to grasp identity concerning power which can be supplied by the connected external apparatus.
When an electronic device uses a detachable battery, an unidentified battery may be mounted in the device. When charging an unidentified battery, it is necessary to give consideration to the safety of the electronic device. Japanese Patent Laid-Open No. 2005-341775 discloses a technique of performing an authentication process by exchanging data between the electronic device and a mounted battery to determine whether the battery is genuine, and performing charge control upon grasping the identity of the battery by the authentication process.
According to Japanese Patent Laid-Open No. 2005-341775, after the identity of a battery is clarified by an authentication process, the battery is charged. However, there is no consideration given to clarifying the identity of an external apparatus as a power supply source for charging a battery.